<?php
namespace BP\GPM;
class BarOfStartlist extends BarBase {
	public function getNo () 
	{
		return $this;
	}
	public function getName () 
	{
		return "我发起的流程";
	}
	public function getIsCanView () 
	{
		if ((SystemConfig::getAppCenterDBType() == $DBType->MSSQL))
		{
			return  TRUE ;
		}
		return  FALSE ;
	}
	public function getTitle () 
	{
		return "我发起的流程";
	}
	public function getMore () 
	{
		return "<a href='/WF/Start.htm' target=_self >我要发起流程</a>";
	}
	public function getDocuments () 
	{
		$ps = new Paras();
		if ((SystemConfig::getAppCenterDBType() == $DBType->MSSQL))
		{
			$ps->SQL = (("SELECT top 9 Title,RDT,FK_Flow,WorkID,FK_Node,Sender FROM WF_GenerWorkFlow WHERE Starter=" . $ps->getDBStr()) . "FK_Emp ORDER BY WorkID ");
		}
		$ps->AddFK_Emp();
		$dt = DBAccess->RunSQLReturnTable($ps);
		$html = "<table style='width:100%;'>";
		$idx = 0;
		foreach ($dt->Rows as $dr) 		{
			$fk_flow = $dr->get("FK_Flow");
			$workID = $dr->get("WorkID");
			$nodeID = $dr->get("FK_Node");
			$title = $dr->get("Title");
			$sender = $dr->get("Sender");
			$rdt = $dr->get("RDT");
			++$idx;
			$html += "<tr>";
			$html += (("<td>" . $idx) . "</td>");
			$html += (((((((("<td><a href='../WF/WFRpt.htm?FK_Flow=" . $fk_flow) . "&WorkID=") . $workID) . "&FK_Node=") . $nodeID) . "&1=2' target=_blank >") . $title) . "</a></td>");
			$html += (("<td>" . $sender) . "</td>");
			$html += "</tr>";
		}
		$html += "</table>";
		return $html;
	}
	public function getWidth () 
	{
		return "300";
	}
	public function getHeight () 
	{
		return "200";
	}
	public function getIsLine () 
	{
		return  TRUE ;
	}
}
?>
